
import request from '@/utils/request'

// 查询金蝶-财务-应付票据列表
export function getList(query) {
  return request({
    url: '/heart/KingFinancePayBill/list',
    method: 'get',
    params: query
  })
}


// 查询金蝶-财务-应付票据详细
export function getDetail(id) {
  return request({
    url: '/heart/KingFinancePayBill/' + id,
    method: 'get'
  })
}

// 新增金蝶-财务-应付票据
export function addInfo(data) {
  return request({
    url: '/heart/KingFinancePayBill',
    method: 'post',
    data: data
  })
}

// 修改金蝶-财务-应付票据
export function editInfo(data) {
  return request({
    url: '/heart/KingFinancePayBill',
    method: 'put',
    data: data
  })
}
// 修改金蝶-财务-应付票据-到期付款
export function editPay(data) {
    return request({
      url: '/heart/KingFinancePayBill/pay',
      method: 'post',
      data: data
    })
  }
  // 修改金蝶-财务-应付票据-退票
export function editRefund(data) {
    return request({
      url: '/heart/KingFinancePayBill/refund',
      method: 'post',
      data: data
    })
  }

// 删除金蝶-财务-应付票据
export function deleteInfo(id) {
  return request({
    url: '/heart/KingFinancePayBill/' + id,
    method: 'delete'
  })
}

// 导出金蝶-财务-应付票据
export function exportInfo(query) {
  return request({
    url: '/heart/KingFinancePayBill/export',
    method: 'get',
    params: query
  })
}

// 查询是否有付款权限
export function queryStatus(data) {
  return request({
    url: '/heart/KingFinancePayBill/queryStatus',
    method: 'post',
    data
  })
}